package com.summer.safe.system.entity;


import com.summer.safe.base.TreeEntity;

/**
 * 区域Entity
 *
 */
public class Area extends TreeEntity<Area> {
    private static final long serialVersionUID = 1L;
    /*
     * 父级部门
     */
    private Area parentJson;    //用于Json数据
    /**
     * 区域编码
     */
    private String code;
    /**
     * 区域名称
     */
    private String name;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 区域类型（1：国家；2：省份、直辖市；3：地市；4：区县）
     */
    private String type;

    public Area() {
        super();
    }

    public Area(String id) {
        super(id);
    }

    @Override
    public Area getParent() {
        return parent;
    }

    @Override
    public void setParent(Area parent) {
        this.parent = parent;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Integer getSort() {
        return sort;
    }

    @Override
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Area getParentJson() {
        parentJson = parent;
        return parentJson;
    }

    public void setParentJson(Area parentJson) {
        this.parentJson = parentJson;
    }
}
